

import os
import sys

directory = sys.argv[1]

sum_size = 0
for root, dirs, files in os.walk(directory):
    for file in files:
        sum_size += os.path.getsize(os.path.join(root, file))

print("目录大小: ", sum_size/1024/1024, "MB")
